import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int[] arr=new int[n];
        for(int i=0;i<n;i++){
            arr[i]=sc.nextInt();
        }
        int max=arr[0];
        int min=arr[0];
        double ave=0;
        int sum=arr[0];
        for(int i=1;i<n;i++){
            if(arr[i]>max){
                max=arr[i];
            }
            if(arr[i]<min){
                min=arr[i];
            }
            sum+=arr[i];
        }
        ave=sum*1.0/n;
        System.out.println(max);
        System.out.println(min);
        System.out.println(ave);
    }
    public static void main3(String[] args) {
        Scanner sc=new Scanner(System.in);
        long n=sc.nextLong();
        while(n>0){
            System.out.print(n+" ");
            n/=2;
        }
    }
    public static void main2(String[] args) {
        Scanner sc=new Scanner(System.in);
        int T=sc.nextInt();
        int j=0;
        while(j<T){
            int n=sc.nextInt();
            int[] arr=new int[n];
            int count=0;
            for(int i=0;i<n;i++){
                arr[i]=sc.nextInt();
            }
            for(int i=0;i<n;i++){
                for(int m=i;m<n;m++){
                    for(int b=m+1;b<n;b++){
                        if(arr[i]+arr[m]==arr[b]){
                            count++;
                        }
                    }
                }
            }
            System.out.println(count);
            j++;
        }
    }
    public static void main1(String[] args) {
        Scanner sc=new Scanner(System.in);
        String str=sc.next();
        int count=0;
        char[] ch=str.toCharArray();
        for(int i=0;i<str.length()-7;i++){
            if(ch[i]=='c'&&ch[i+1]=='h'&&ch[i+2]=='u'&&ch[i+3]=='a'&&
                    ch[i+4]=='n'&&ch[i+5]=='z'&&ch[i+6]=='h'&&ch[i+7]=='i'){
                count++;
            }
        }
        System.out.println(count);
    }
}